/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ufps.cuatro.modelo.biblioteca;

import com.ufps.cuatro.util.base.ObjectBase;
import java.util.ArrayList;

/**
 *
 * @author Catc
 */
public class StaticListModelObject extends ObjectBase{
    private static final long serialVersionUID = -1487153940224995119L;
    
    private String name;
    private ArrayList<ItemStaticListModelObject> objItems;

    public StaticListModelObject(String name, ArrayList<ItemStaticListModelObject> objItems) {
        this.name = name;
        this.objItems = objItems;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<ItemStaticListModelObject> getObjItems() {
        return objItems;
    }

    public void setObjItems(ArrayList<ItemStaticListModelObject> objItems) {
        this.objItems = objItems;
    }

    @Override
    public String toString() {
        return name;
    }

    @Override
    public int compareTo(Object o) {
        try{
            StaticListModelObject obj = (StaticListModelObject) o;
            return name.compareTo(obj.getName());
        }catch(java.lang.NullPointerException ex){}
        return 0;
    }
}
